@openpresentation/opf 0.26.4 → 0.26.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/browser.js +13 -12
- package/dist/{chunk-XFOOKVRI.js → chunk-CIWC7DRZ.js} +1977 -373
- package/dist/{chunk-O6BY3AU2.js → chunk-DXTPLVAK.js} +1 -1
- package/dist/{chunk-QH2W6HIM.js → chunk-EFMR32A5.js} +1 -1
- package/dist/{chunk-6NBTZYYD.js → chunk-HPEZCAYC.js} +1 -1
- package/dist/{chunk-ZSZDVIDV.js → chunk-K5Q3LLYK.js} +2 -2
- package/dist/chunk-KPALXWX3.js +712 -0
- package/dist/{chunk-6IXSHIAL.js → chunk-L7YEVQHP.js} +6 -6
- package/dist/chunk-MD3CJ5YJ.js +452 -0
- package/dist/{chunk-MN7DRK57.js → chunk-MLH5LIGF.js} +11 -21
- package/dist/{chunk-EDCRBTJF.js → chunk-STIYINEL.js} +3 -3
- package/dist/{chunk-H5QC3X3K.js → chunk-TAV5S2JG.js} +1 -1
- package/dist/{chunk-NZLW6FBQ.js → chunk-UFEWQDQI.js} +1 -1
- package/dist/{chunk-GWJBZ4LC.js → chunk-UY6SQVR2.js} +5 -5
- package/dist/{chunk-PIO73BQ6.js → chunk-WAZDP2WS.js} +11 -20
- package/dist/{conversion-DSafOGzh.d.ts → conversion-C7o2EpDb.d.ts} +2 -2
- package/dist/conversion-PMJWLHDV.js +21 -0
- package/dist/convert.js +5 -5
- package/dist/deck.js +8 -8
- package/dist/diff.js +2 -2
- package/dist/docs.js +3 -3
- package/dist/explain-JSuESV-Y.d.ts +71 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +17 -16
- package/dist/markdown.js +6 -6
- package/dist/node-engine.d.ts +2 -2
- package/dist/node-engine.js +17 -16
- package/dist/pagination.js +2 -2
- package/dist/patch.js +1 -1
- package/dist/schema.js +1 -1
- package/dist/source.d.ts +83 -2
- package/dist/source.js +10 -9
- package/dist/validator.js +1 -1
- package/dist/yaml.js +4 -4
- package/package.json +5 -5
- package/dist/chunk-QAEBYDKY.js +0 -192
- package/dist/conversion-QIAJM6DQ.js +0 -20
package/README.md
CHANGED
|
@@ -105,6 +105,8 @@ Two browser-safe subpaths for source editors, the CLI and agents. `@openpresenta
|
|
|
105
105
|
|
|
106
106
|
`validate(input, options?)` is the one checker, from the root and from `@openpresentation/opf/validator`. `input` is a parsed presentation or strict JSON text; the result is a `ValidationReport` whose `findings` (the shared `Finding` format, `spec/schemas/finding.schema.json`) each have a stable `opf/<rule>` id, a severity and one of six categories: `format` (JSON syntax, duplicate keys, schema), `references` (catalog references, assets, citations, datasets), `policy` (host `contracts`), `accessibility` (contrast, alt text, reading order, links), `layout` (overflow, type size, image resolution, fonts) and `content` (placeholders, empty slides, non-numeric chart cells). `valid` means no finding has severity `error`, which by default only `format`, `references` and `policy` findings can have. Text input adds line and column; `only`, `ignore` and `severity` pick and promote rules or categories; composition is lazy, so `validate(deck, { only: ["format"] })` costs what a schema check costs. Read-only and deterministic: no remote resources are fetched. See [the validate guide](../../docs/validate.md). A clean report does not certify layout, fonts, or native export fidelity.
|
|
107
107
|
|
|
108
|
+
`describeFinding(finding, { document })` and `explain(ruleId)` put findings in plain words. `describeFinding` (from `@openpresentation/opf/source`) returns `{ message, next }` for any finding: what is wrong with the field in backticks, and what could come next ("did you mean `center`?"), written from the finding's own data and the document; every `opf/*` rule has its text. `explain` (also on the package root) returns a rule's summary, rationale, `fix` and a small before/after `example`. See [Plain-words text and `explain`](../../docs/validate.md#plain-words-text-and-explain).
|
|
109
|
+
|
|
108
110
|
### Patch, diff, merge and format (0.12.0)
|
|
109
111
|
|
|
110
112
|
Added in 0.12.0 (not in 0.11.4 or earlier): `@openpresentation/opf/patch` is the one RFC 6902 implementation the CLI and the editor share (`applyPatch`, `applyPatchWithInverse`, `invertPatch`, strict pointer helpers, optional schema validation of the result); `@openpresentation/opf/diff` has `diff` (slide matching by id, content and similarity, moves, a readable report and a JSON Patch) and `merge` (three-way merge with conflict objects that never drop a side); `@openpresentation/opf/format` has `format` (canonical key order and layout, idempotent). See [the guide](../../docs/patch-diff-merge-format.md).
|
package/dist/browser.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { OPFApiError } from './chunk-
|
|
2
|
-
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, stats, updateFromCatalog } from './chunk-
|
|
1
|
+
import { OPFApiError } from './chunk-UFEWQDQI.js';
|
|
2
|
+
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, stats, updateFromCatalog } from './chunk-UFEWQDQI.js';
|
|
3
3
|
export { specFileEntries, specFileKinds, specFilePaths } from './chunk-UJSAR6GF.js';
|
|
4
4
|
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-PJSPHHRK.js';
|
|
5
5
|
export { OPFDataImportError, ingest, parseTabularData } from './chunk-TKQ2VFV5.js';
|
|
6
|
-
export { OPFPaginationError, paginate, paginateSlide } from './chunk-
|
|
7
|
-
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-
|
|
8
|
-
export { fromMarkdown, toMarkdown } from './chunk-
|
|
9
|
-
import './chunk-
|
|
6
|
+
export { OPFPaginationError, paginate, paginateSlide } from './chunk-EFMR32A5.js';
|
|
7
|
+
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-STIYINEL.js';
|
|
8
|
+
export { fromMarkdown, toMarkdown } from './chunk-UY6SQVR2.js';
|
|
9
|
+
import './chunk-WAZDP2WS.js';
|
|
10
10
|
import './chunk-RYZPBJLB.js';
|
|
11
|
-
|
|
12
|
-
import './chunk-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export {
|
|
11
|
+
export { explain } from './chunk-MD3CJ5YJ.js';
|
|
12
|
+
import './chunk-MLH5LIGF.js';
|
|
13
|
+
import './chunk-DXTPLVAK.js';
|
|
14
|
+
export { OPFMarkdownError } from './chunk-KPALXWX3.js';
|
|
15
|
+
import './chunk-HPEZCAYC.js';
|
|
16
|
+
export { diff, merge } from './chunk-TAV5S2JG.js';
|
|
17
|
+
export { CATALOG_SCHEMA, DEFAULT_VALIDATION_THRESHOLDS, OPFPatchError, OPFPatchValidationError, OPFValidationError, applyPatch, assertValid, assertValidCatalogRecord, catalogDisplayKinds, catalogSchemaNames, findValidationRule, resolveSlideContext, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-CIWC7DRZ.js';
|
|
17
18
|
export { CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, CHART_TYPES, DEFAULT_VARIABLE_DATE_FORMAT, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, LANGUAGES, LOGO_SHAPES, OPFCatalogsOptionError, OPFUnresolvedReferenceError, OPFVariableError, SLIDE_SCOPED_BUILTINS, SOCIAL_PLATFORMS, VARIABLE_KINDS, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, chartNumber, coerceVariableValue, datasetDiagnostics, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isTemplate, isXYChartType, listBuiltinVariables, listVariables, normalizeLanguageFamily, numberFormatError, parseReference, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './chunk-XRMV2GMB.js';
|
|
18
19
|
export { OPFFormatError, format } from './chunk-EQ6S5SEZ.js';
|
|
19
20
|
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-F4HFDP6I.js';
|